#ifndef ADJUSTWINDOW_H
#define ADJUSTWINDOW_H

#include"mainwindow.h"
#include <QMainWindow>
#include<QPushButton>
#include<QLineEdit>
#include<QVBoxLayout>
#include<QSpinBox>
#include<QPushButton>
#include<QHBoxLayout>
#include<QLabel>
#include<QColorDialog>
#include"colorchoose.h"

class AdjustWindow : public QMainWindow
{
    Q_OBJECT
public:
    explicit AdjustWindow(QWidget *parent = nullptr);
    ~AdjustWindow();

private:
    MainWindow * w;
    ColorChoose * c;
    QSpinBox * playerNumberBox;
    QSpinBox * boardWidthSizeBox;
    QSpinBox * boardHeightSizeBox;
    QSpinBox * winCondition;
    QPushButton * confirmButton;
    QPushButton * closeButton;
    QLabel * playerNumberBoxLabel;
    QLabel * boardHeightSizeBoxLabel;
    QLabel * boardWidthSizeBoxLabel;
    QLabel * winConditionLabel;
    void ActSignalFromOverMessage();
    void ActSignalFromMainClose();
    QColor * color;

private slots:
    void onConfirmButtonClicked();
    void onCloseButtonClicked();
    void sendBoardHeightSizeBoxValueChangedSignal(int value);
    void sendPlayerNumberBoxValueChangedSignal(int value);
    void sendBoardWidthSizeBoxValueChangedSignal(int value);
    void sendConditionValueChangedSignal(int value);
    // void receivedColor(QColor*);

signals:
    void signalCloseFromAdjust();
    void signalBoardHeightSizeBoxValueChanged(int BoardHeightSizeBoxValue);
    void signalPlayerNumberBoxValueChanged(int PlayerNumberBoxValue);
    void signalBoardWidthSizeBoxValueChanged(int BoardWidthSizeBoxValue);
    void sendIfConfirm(bool ret);
    void sendMainWindow(MainWindow*);
    void sendCondition(int Condition);
    // friend ColorChoose;
};

#endif // ADJUSTWINDOW_H

